#ifndef QUERY_GRAPH_
#define GRAPH_GRAPH_
#include"../../process.h"
#include"node.h"
#include"../edge_checker/edge_checker.h"

class QueryGraph
{
	private:
		map<string, QueryNode> graph;
		void add_edge(QueryNode &n1, QueryNode &n2);
		void search(QueryNode &seed, vector<string> &elem, set<string> &visited);
		void add_node(QueryNode node);
	public:
		QueryGraph();
		QueryGraph(iostream *input);
		void add_node(Query &query);
		QueryNode get_node(string name);
		void update_edge(EdgeChecker &checker);
		void flood(vector<vector<string>> &groups);
		void flood(vector<vector<QueryNode>> &groups);
};
#endif